/**
 * 对称二叉树
 */

function isSynnetric(root){
    if(!root) return true;

    function leftAndRight(left, right) {
        if(!left && !right) return true
        if(!left || !right) return false
        if(left.node !== right.node) return false
        return leftAndRight(left.left, right.left) &&leftAndRight(right.left, right.right)
    }

    return leftAndRight(root.left, root.right)
}
